package com.simple.ds.service;

import com.simple.common.entity.po.sys.Trade;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author yasud
 * @date 2021年09月19日 13:27
 * @description
 **/
public interface TradeApi {

    /**
     * xxx
     * @param param
     * @return
     */
    List<Trade> findByProperty_(Map<String, Object> param);

    Trade findByPropertyOne_(Map<String, Object> param);

    Trade save_(Trade trade);

    Trade updateById_(Trade trade);

    int findByRiskDoNotHour(String cardNo,
                            String cardHolder,
                            String channelStatus,
                            Date date,
                            Long channelId);

    //Not sufficient funds
    int findByRiskConfigError(
            String cardNo,
            String channelStatus,
            Date date,
            Long channelId);

    int findByRiskInvalidTransaction(
            String cardHolder,
            String channelStatus,
            Date date,
            Long channelId);

    //permitted
    int findByRiskRestrictedCard(String channelStatus,
                                 String cardNo,
                                 String cardHolder,
                                 Date date,
                                 Long channelId);

    //permitted
    int findByRiskCardHolderCount(String ipAddress,
                                  String cardNo,
                                  String cardHolder,
                                  String date,
                                  Long channelId);

    List<Trade> findTradeByChannelOrderNo( String channelTradeNo);

    Trade findById_(Long tradeNo);
}
